package com.timothy.statistics;

import java.util.ArrayList;
import java.util.List;

import android.util.Log;

import com.timothy.android.util.XMLUtil;
import com.timothy.question.BaseStation;

public class LoginBuilder {

	private final static String LOG_TAG = "LoginBuilder";

	public static List<BaseStation> parseBaseStation(String content) {
		Log.i(LOG_TAG,"parseBaseStation()...");
		
		List<BaseStation> bsList = new ArrayList<BaseStation>();
		List<String> list = XMLUtil.getChildren(content);
		for (String s : list) {
			BaseStation bs = new BaseStation();
			bs.setName(XMLUtil.getPropertyValue(s, "Name"));
			bsList.add(bs);
		}
		return bsList;
	}
	
	public static List<String> parseDemoSession(String content) {
		Log.i(LOG_TAG,"parseDemoSession()...");
		
		List<String> bsList = new ArrayList<String>();
		List<String> list = XMLUtil.getChildren(content);
		for (String s : list) {
			bsList.add(XMLUtil.getPropertyValue(s, "Name"));
		}
		return bsList;
	}
}
